source('loader.R')
source('sunspots.R')

getfilename <- function(filename)
	paste('../tex/', filename, '.tex', sep='')

output <- function(filename, width)
	pdf(paste('../tex/', filename, '.pdf', sep=''),
		paper='special', width=8, height=8/width)



X <- sunspots()


output('sunspots-means', 1.65)
sunspots_means(X)
dev.off()

output('sunspots-deviations', 1.65)
sunspots_deviations(X)
dev.off()



output('sunspots-lambdas-hist', 2)
lambdas_hist(X, c(0.2,1), c(-4,5))
dev.off()



output('sunspots-lambdas-fit', 4)
lambdas_fit2(X, c(0.1,1.1), c(0,0.01))
dev.off()




# global warming - interesting:

output('sunspots-lambdas-time', 2.5)
print(lambdas_time2(X))
dev.off()

